<!--<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{:M('name')}</title>
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" href="__STATIC__/css/base.css">
<link rel="stylesheet" href="__STATIC__/css/qb_ui.css">
<link rel="stylesheet" href="__STATIC__/icon/icon.css">
<script type="text/javascript" src="__STATIC__/js/core/jquery.min.js"></script>
<script type="text/javascript" src="__STATIC__/layer/layer.js"></script>
</head>
<body>-->
{extend name="$index_style_layout" /}

<!--SEO相关-->
{block name="head_title"}{$fid?($info['seo_title']?:$info['name']):$m_info['title']}{/block}
{block name="head_keword"}{$fid?($info['seo_keywords']?:$info['name']):$m_info['title']}{/block}
{block name="head_description"}{$info.seo_description}{/block}


{block name="body_content"}
<link rel="stylesheet" href="__STATIC__/bbs/list1.css">
<div class="bbsContainer">
<style type="text/css">
.category-head{width:100%;background:#fff;margin:10px 0 10px 0;padding:8px 0 5px 0;display: inline;white-space: nowrap;overflow-x:scroll;float:left;overflow-y:hidden}
.category-head li{display:inline-block;height:30px;padding-left:15px;}
</style>
<ul class="category-head">
{volist name="0|sort_config=###,'all'" id="rs"}
       <li><a href="{:urls('content/index',['fid'=>$key])}" {eq name="$fid" value="$key"}style="color:blue;"{/eq}>{$rs}</a></li>
{/volist}
</ul>
<!--
	<ul class="topBoxs">
		<li class="logo"><a href="/"><img src="__STATIC__/bbs/logo1.png"></a></li>
		<li class="info"><span>齐博官方论坛</span><em>会员2540位</em></li>
		<li class="atten"><a href="{:urls('add',['fid'=>$fid])}">发表</a></li>
	</ul>
	<div class="countInfo">
		<ul>
			<ol><span>主题</span><em>2188</em>篇</ol>
			<li><span>浏览</span><em>12312</em>次</li>
		</ul>
	</div>
-->
	<ul class="topBoxs">		 
		<li class="atten"><a href="{:urls('content/add',['fid'=>$fid])}">我要发表</a></li>
	</ul>
	<div class="ChangeShow">
		<ul class="types">
			<li onclick="ChangeShow(0,'list')" class="ck">最新回复</li>
			<li onclick="ChangeShow(1,'id')">最新主题</li>
			<li onclick="ChangeShow(2,'status')">推荐主题</li>
		</ul>
		<!--
		<ul class="ListType">
			<li><a href="#"><span>置顶</span>校园暴力事件频发，为何校园变“江湖”？</a></li>
			<li><a href="#"><em>精华</em>数据告诉你，未来几年升学你要和多少人PK？</a></li>
			<li><a href="#"><i>热门</i>人大女生获吴玉章奖学金 发13篇SCI论文</a></li>
		</ul>
		-->
	</div><!--
	<div class="countPost">
		<ul>
			<ol><i class="si si-calendar"></i>今日<span>5</span>帖</ol>
			<li><i class="fa fa-calendar"></i>昨日<span>20</span>帖</li>
		</ul>
	</div>-->
	<div class="ListInfos">
<!--name是标签名，跟通用标签不能重名，rows取几条数据,order按什么方式排序，list代表可控排序，id即时间,view代表浏览量-->
		{qb:listpage name="bbs_list_page_wap" status="1" rows="20" order="list"}
		<div class="lists">
			<ul>
				<ol><a href="{:get_url('user',['uid'=>$rs['uid']])}" target="_blank"><img style="border-radius:100%;" src="{:get_user_icon($rs['uid'])}" onerror="this.src='__STATIC__/images/nobody.gif'" ></a><div><span>{$rs.username}</span><em>{$rs.time}</em></div></ol>
				<li><i class="fa fa-thumbs-o-up"></i><span>{$rs.agree}</span><label><i class="fa fa-commenting-o"></i><em>{$rs.replynum}</em></label></li>
			</ul>
			<div class="title"><a href="{:urls('content/show',['id'=>$rs['id']])}">{if ($rs.list>time())}<span>顶</span> {elseif ($rs.status>1)}<em>精</em> {elseif ($rs.view>200)}<i>热</i>  {elseif (time()-$rs.create_time<3600*24)}<i>新</i> {/if}{$rs.title}</a></div>
		</div>
		{/qb:listpage} 		
	</div>
	<div class="ShowMoreInfo"><span onclick="ShowMoreInfo()">加载更多</span></div>
</div>
<script type="text/javascript">
var Mpage=1;
var byorder='id';
var showmorebbs='<span onclick="ShowMoreInfo()">加载更多</span>';
function ShowMoreInfo(){
	Mpage++;
	$('.ShowMoreInfo').html('内容加载中……');
	$.get('{qb:list_url name="bbs_list_page_wap" /}'+Mpage+'&order='+byorder+'&'+Math.random(),function(res){
		if(res.code==0){
			if(res.data==''){
				layer.msg("已经显示完了！",{time:500});
				$('.ShowMoreInfo').html('');
			}else{
				$('.ListInfos').append("<span class='Mpage"+Mpage+"'></span>");
				$('.Mpage'+Mpage).hide();
				$('.Mpage'+Mpage).html(res.data);
				$('.Mpage'+Mpage).fadeIn();
				$('.ShowMoreInfo').html(showmorebbs);
				scroll_get = true
			}			
		}else{
			layer.msg(res.msg,{time:2500});
		}
	});
}

//滚动显示更多
var scroll_get = true;	//做个标志,不要反反复复的加载
$(document).ready(function () {
	$(window).scroll(function () {
		if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
			scroll_get = false;			
			layer.msg('内容加截中,请稍候',{time:1500});
			ShowMoreInfo();
		}
	});
});

function ChangeShow(num,order){
	Mpage=1;
	byorder=order;
	$('.ChangeShow .types li').removeClass('ck');
	$('.ChangeShow .types li').eq(num).addClass('ck');
	$.get('{qb:list_url name="bbs_list_page_wap" /}'+Mpage+'&order='+byorder+'&'+Math.random(),function(res){
		
		if(res.code==0){
			if(res.data==''){
				layer.msg("没有相应的帖子！",{time:500});
				$('.ListInfos').html('');
				$('.ShowMoreInfo').html('');
			}else{
				$('.ListInfos').html("<span class='Mpage"+Mpage+"'></span>");
				$('.Mpage'+Mpage).hide();
				$('.Mpage'+Mpage).html(res.data);
				$('.Mpage'+Mpage).fadeIn();
				$('.ShowMoreInfo').html(showmorebbs);
			}			
		}else{
			layer.msg(res.msg,{time:2500});
		}
	});
}

//回复帖子 
var replayid=0;
function replaycomment(id){
	replayid=id;
	layer.open({
	  type: 1,
	  title:'我要回复',
	  area: ['90%'], //宽高，高参数忽略
	  content: '<ul class="replayBox"><ol><textarea placeholder="请输入回复内容"></textarea></ol><li><button onclick="replaycomment1();">确定</button><span onclick="layer.closeAll();">取消</span></li></ul>'
	});
}
function replaycomment1(){
	var replaycont=$('.replayBox textarea').val();
	//得到内容回复
	layer.alert(replaycont);
}
</script>

<!-- 发布按钮 -->
{include file="post_btn"}

{/block}